#ifndef UDPCLIENT_H
#define UDPCLIENT_H

#include <QUdpSocket>

class UDPClient : public QUdpSocket
{
    Q_OBJECT
public:
    UDPClient(QObject *parent = nullptr);
    ~UDPClient();

    //登录
    void login(const QString& msg);

    //发送数据，并将是否发送完整(由服务端返回true or false)
//    const bool sendString(const QString& msg);

public slots:
    void readPendingDatagrams();

private:
    QUdpSocket *m_udpClientSock;
    unsigned int count;

};

#endif // UDPCLIENT_H
